<?php

// initialize a session
session_start();
$username = "nobody";
if (isset($_SESSION['username'])) {
    $username = $_SESSION['username'];
} else {
    header('Location: /login_form.html');
}
?>
<html>
    <body>
        <p>Hello <?=$username?></p>
        <p>The session id is  <?=session_id()?></p>
        <a href="/php/logout.php">Logout</a>
    </body>
</html>

